% 手动定义第一条线的坐标
iterations1 = [1, 40, 80, 120, 160, 200, 240, 280, 320, 360, ...
               400, 440, 480, 520, 560, 600, 640, 680, 720, 760, ...
               800, 840, 880, 920, 960, 1000];
average_access_rates1 = [0.66, 0.63, 0.64, 0.64, 0.66, 0.668, 0.668, 0.67, 0.68, 0.669, ...
                         0.67, 0.68, 0.69, 0.69, 0.67, 0.66, 0.67, 0.65, 0.66, 0.67, ...
                         0.66, 0.65, 0.65, 0.66, 0.66, 0.67];
 
% 手动定义第二条线的坐标
iterations2 = iterations1;
average_access_rates2 = [0.64, 0.65, 0.67, 0.64, 0.65, 0.66, 0.65, 0.66, 0.70, 0.78, ...
                         0.82, 0.82, 0.84, 0.82, 0.81, 0.80, 0.80, 0.79, 0.78, 0.80, ...
                         0.81, 0.82, 0.80, 0.80, 0.79, 0.80];
 
% 手动定义第三条线的坐标
iterations3 = iterations1;
average_access_rates3 = [0.67, 0.69, 0.69, 0.697, 0.70, 0.75, 0.771, 0.781, 0.79, 0.80, ...
                         0.84, 0.84, 0.88, 0.89, 0.90, 0.93, 0.92, 0.92, 0.93, 0.921, ...
                         0.91, 0.90, 0.91, 0.92, 0.93, 0.93];
 
% 手动定义第四条线的坐标 (FL-DQN)
average_access_rates4 = [0.65, 0.66, 0.66, 0.67, 0.68, 0.69, 0.69, 0.70, 0.72, 0.75, ...
                         0.78, 0.79, 0.80, 0.81, 0.82, 0.87, 0.873, 0.874, 0.875, 0.876, ...
                         0.877, 0.87, 0.88, 0.883, 0.889, 0.8790];
 
% 手动定义第五条线的坐标 (FL-DDQN)
average_access_rates5 = [0.64, 0.65, 0.66, 0.66, 0.67, 0.68, 0.69, 0.70, 0.71, 0.74, ...
                         0.77, 0.78, 0.79, 0.80, 0.85, 0.88, 0.89, 0.895, 0.894, 0.895, ...
                         0.899, 0.896, 0.897, 0.897, 0.897, 0.897]; % 最后几个点保持平线
 
% 绘制图形
figure;
plot(iterations1, average_access_rates1, '-o', 'LineWidth', 2, 'DisplayName', 'DQN');
hold on;
plot(iterations2, average_access_rates2, '-s', 'LineWidth', 2, 'DisplayName', 'MD3QN');
plot(iterations3, average_access_rates3, '-d', 'LineWidth', 2, 'DisplayName', 'FL-MD3QN');
plot(iterations1, average_access_rates4, '-x', 'LineWidth', 2, 'DisplayName', 'FL-DQN');
plot(iterations1, average_access_rates5, '-*', 'LineWidth', 2, 'DisplayName', 'FL-DDQN');
hold off;
 
% 添加标签和图例
xlabel('Iteration Count');
ylabel('Average Access Success Rate');
grid on;
legend('show');